package com.yaorange.nongjt.service.impl;

import java.util.List;
import com.yaorange.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yaorange.nongjt.mapper.NjtCertificateCountMapper;
import com.yaorange.nongjt.domain.NjtCertificateCount;
import com.yaorange.nongjt.service.INjtCertificateCountService;

/**
 * 合格证统计数据Service业务层处理
 * 
 * @author junjiang
 * @date 2025-03-02
 */
@Service
public class NjtCertificateCountServiceImpl implements INjtCertificateCountService 
{
    @Autowired
    private NjtCertificateCountMapper njtCertificateCountMapper;

    /**
     * 查询合格证统计数据
     * 
     * @param id 合格证统计数据主键
     * @return 合格证统计数据
     */
    @Override
    public NjtCertificateCount selectNjtCertificateCountById(Long id)
    {
        return njtCertificateCountMapper.selectNjtCertificateCountById(id);
    }

    /**
     * 查询合格证统计数据列表
     * 
     * @param njtCertificateCount 合格证统计数据
     * @return 合格证统计数据
     */
    @Override
    public List<NjtCertificateCount> selectNjtCertificateCountList(NjtCertificateCount njtCertificateCount)
    {
        return njtCertificateCountMapper.selectNjtCertificateCountList(njtCertificateCount);
    }

    /**
     * 新增合格证统计数据
     * 
     * @param njtCertificateCount 合格证统计数据
     * @return 结果
     */
    @Override
    public int insertNjtCertificateCount(NjtCertificateCount njtCertificateCount)
    {
        njtCertificateCount.setCreateTime(DateUtils.getNowDate());
        return njtCertificateCountMapper.insertNjtCertificateCount(njtCertificateCount);
    }

    /**
     * 修改合格证统计数据
     * 
     * @param njtCertificateCount 合格证统计数据
     * @return 结果
     */
    @Override
    public int updateNjtCertificateCount(NjtCertificateCount njtCertificateCount)
    {
        njtCertificateCount.setUpdateTime(DateUtils.getNowDate());
        return njtCertificateCountMapper.updateNjtCertificateCount(njtCertificateCount);
    }

    /**
     * 批量删除合格证统计数据
     * 
     * @param ids 需要删除的合格证统计数据主键
     * @return 结果
     */
    @Override
    public int deleteNjtCertificateCountByIds(Long[] ids)
    {
        return njtCertificateCountMapper.deleteNjtCertificateCountByIds(ids);
    }

    /**
     * 删除合格证统计数据信息
     * 
     * @param id 合格证统计数据主键
     * @return 结果
     */
    @Override
    public int deleteNjtCertificateCountById(Long id)
    {
        return njtCertificateCountMapper.deleteNjtCertificateCountById(id);
    }
}
